package CAODemo;

public class ConstructMethod {
    int a;
    int b;
    public ConstructMethod() {
        System.out.println("调用构造方法");
    }
    public ConstructMethod(int a) {
        System.out.println("调用构造方法");
        this.a = a;
    }
    public ConstructMethod(int b, int a) {
        System.out.println("调用构造方法");
        this.b = b;
        this.a = a;
    }
    public static void main(String[] args) {
        ConstructMethod A = new ConstructMethod();
        ConstructMethod B = new ConstructMethod(1);
        ConstructMethod C = new ConstructMethod(1,2);
    }
}
